home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lantools
/
blueprnt
/
bpcomdef.asm
< prev
next >
Wrap
Assembly Source File
|
1989-09-27
|
3KB
|
105 lines
;************************************************************
;* BP-LAN Remote Modem Installation Utility (BPCOMDEF.ASM) *
;* by Craig Chaiken *
;* August 20, 1989 *
;* *
;* Function: Installs Remote Network Printer *
;* *
;* Command Format: *
;* BPCOMDEF /socket_num /local_modem /remote_modem *
;************************************************************
;
codeseg segment
assume cs:codeseg,ds:codeseg,es:codeseg
org 100h
start: jmp intinst
include bpbioshd.mod
;*** Variables ***
;
old_int14h_vector label dword
old_int14h_offs dw ?
old_int14h_seg dw ?
socket_num db 0
local_printer db 0
remote_printer db 0
packet_buffer db 6 dup (0)
;*****************************
;*** New Interrupt Handler ***
;*****************************
new_int14h proc far
cmp dl,cs:local_printer
jz new_i1
jmp cs:old_int14h_vector
new_i1: pushf
push bx
push cx
push dx
push si
push di
push ds
push es
push cs ;Copy CS into DS
pop ds
mov packet_buffer,'S'
mov packet_buffer+1,ah
mov ah,remote_printer
mov packet_buffer+2,ah
mov packet_buffer+3,al
put_packet socket_num,4,offset packet_buffer
get_packet socket_num,cx,offset packet_buffer
mov ah,packet_buffer
mov al,packet_buffer+1
new_p1: pop es
pop ds
pop di
pop si
pop dx
pop cx
pop bx
popf
iret
new_int14h endp
;*************************************
;*** Install New Interrupt Handler ***
;*************************************
intinst proc near
mov al,cs:[80h]
or al,al
jz default
mov si,81h
call get_opt ;get socket_num
jb default
mov socket_num,cl
call get_opt ;get local printer number
jb default
mov local_printer,cl
call get_opt ;get remote printer number
jb default
mov remote_printer,cl
default: mov ah,35h ; get interrupt vector function
mov al,14h
int 21h
mov old_int14h_offs,bx ; save old interrupt
mov old_int14h_seg,es ; address
mov ah,25h ; set interrupt vector function
mov al,14h
mov dx,offset new_int14h ; point to new routine
int 21h
lea dx,intinst
int 27h
intinst endp
include misc.mod
codeseg ends
end start
;************************************************************
;* End of Interrupt Handler Installation Module *
;************************************************************